package com.zbkj.crmeb.member.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 商户会员积分管理配置
 * </p>
 *
 * @author xx
 * @since 2022-05-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("eb_member_points_management")
@ApiModel(value="MemberPointsManagement对象", description="商户会员积分管理配置表")
public class MemberPointsManagement extends Model<MemberPointsManagement> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "商户会员积分管理id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer merId;

    @ApiModelProperty(value = "积分比例(1积分抵扣多少钱)")
    private BigDecimal pointsRatio;

    @ApiModelProperty(value = "下单积分比例(实际支付1元赠送多少积分)")
    private BigDecimal orderOintsProportion;

    @ApiModelProperty(value = "订单商品售价最高使用积分比例")
    private BigDecimal priceUsageRatio;

    @ApiModelProperty(value = "积分启用标志0未启用，1启用")
    private Boolean pointsEnableFlag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
